home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13828 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: cph-1.news.DK.net!dkuug!dknet!usenet
  2. From: Carsten Bonde <cab@kmd.dk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Special sort algorithm
  5. Date: Wed, 27 Mar 1996 14:09:29 +0100
  6. Organization: Kommunedata
  7. Message-ID: <31593E09.29A0@kmd.dk>
  8. NNTP-Posting-Host: saturn.kmd.dk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13.  
  14. Hi
  15.  
  16. This is not strictly related to C++, but I guess some of you may have a hint
  17. on this anyway.
  18.  
  19. I am trying to make a DOS file sorting program, which is to be part of a commercial product.
  20. It must :
  21.  - Sort big files of short lines
  22.    lines are uneven length
  23.    files are XX MB
  24.    lines are < 100 chars
  25.  - Put resulting file in original file
  26.  - Run in very little memory ( < 50 K)
  27.  - Use about no extra disk space ( < 10% extra)
  28.  - Run reasonably fast
  29.  
  30. I have tried implementing in-file bubblesort and others with the language
  31. being C++. But they are way too slow, even with some optimizing buffers.
  32.  
  33. Does anyone have a suggestion for a good algorithm, or maybe even source.
  34.  
  35. Any hints appreciated.
  36.  
  37. ------------------------------------------------------------------
  38. Carsten Bonde                                      Kommunedata I/S
  39. cab@kmd.dk
  40.